<?php
session_start();
if(empty($_SESSION['auth_username']) && empty($_SESSION['auth_password']))
{
header('Location: ../index.php');
} else if ($_SESSION['auth_level'] == 1)
{
header('Location: ../index.php');
}
include_once '../class_projekt.php';
$projekt = new Projekt;
?>
<htmL>
<head>
    <script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="../js/jquery.tablednd.0.7.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../style.css" />
    <script type="text/javascript">
	$(document).ready(function() {
	$('#table-3').tableDnD({
	    onDrop: function(table, row) {
			
			$('#AjaxResult').load("/slany/ajax/ordnung.php?data="+$.tableDnD.serialize()); 
	       
		   
			
        }
	});
	});
	</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="admin_function">
<a href="admin.php"> Zur&uuml;ck zum Admincenter </a>
<h1>XML-erstellen</h1>
Sprache w&auml;hlen:
<form action="ausgabe.php" method="POST">
<select name="lang">
  <?php $projekt->lang(); ?>
</select>
<input type="submit" value="DANKE" name="submit"> 
 
 
 <?php
 
 if ($_POST['submit']) 
 {
 ?>
<h2>XML - sortieren </h2>
<p><b>
<span id="AjaxResult">Noch nicht sortiert! </span>
</b></p>

<table id="table-3" border="1">

    <?php
	include 'class_xml.php';
	$xml = new xml;
	$xml->ausgabe($_POST['lang']);
	
	?>
</table> 

<?php
}
?>
</div>
</body>
</html>
